package com.fbinggun.fattribute.attribute.attack;

import com.fbinggun.fattribute.FAttributePlugin;
import com.fbinggun.fattribute.data.EntityData;
import com.fbinggun.fbinggunutil.RandomUtil;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.potion.PotionEffectType;

public class Levitation extends BuffAttack {


    @Override
    public double getDamage(EntityData data, EntityDamageByEntityEvent event) {
        return 0;
    }

    @Override
    public String getID() {
        return "Levitation";
    }

    @Override
    public String getKey() {
        return FAttributePlugin.plugin.getConfigKey("Levitation");
    }


    @Override
    public int getCombat() {
        return 0;
    }

    @Override
    public PotionEffectType getPotionEffectType() {
        return PotionEffectType.LEVITATION;
    }

    @Override
    public void getEffect(EntityData data, LivingEntity entity) {
        if(RandomUtil.is(getValue(data)*0.01)){
            super.getEffect(data, entity);
        }
        return;
    }
}
